package com.example.gaoyang.controller;

import com.example.gaoyang.domain.request.WayDirectionRequest;
import com.example.gaoyang.domain.vo.WayDirectionVO;
import com.example.gaoyang.request.Result;
import com.example.gaoyang.service.WayDirectionService;
import com.example.gaoyang.util.ResultUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@Slf4j
@RestController
@RequestMapping("/wayDirection")
public class WayDirectionController {

    @Resource
    private WayDirectionService wayDirectionService;

    @PostMapping("/getWayDirectionList")
    public Result<List<WayDirectionVO>> getWayDirectionList(@RequestBody WayDirectionRequest wayDirectionRequest) {
        return ResultUtil.success(wayDirectionService.getWayDirectionList(wayDirectionRequest));
    }

}
